Closed
Conversation
Collaborator
keugenek
commented
Sep 26, 2025
arsenyinfo
reviewed
Sep 29, 2025
| // Phase 1: AgentMessage with ToolUse -> emit ToolResult | ||
| // IMPORTANT: We check if self.recipient is None OR matches the event's recipient | ||
| // This is crucial because: | ||
| // 1. Some ToolProcessors (like for task execution) have recipient: None to process all tools |
Collaborator
There was a problem hiding this comment.
hmm, can we make ToolProcessor echo the recipient based on who spawned the task? Maybe that's part of https://github.com/appdotbuild/agent/pull/462 though
| let events = self.event_store.load_events::<Event>(&query, None).await?; | ||
| let mut thread = Thread::fold(&events); | ||
|
|
||
| // Check recipient filter |
Collaborator
There was a problem hiding this comment.
This part looks brittle. Maybe it should be a lambda function if we really, really need it?
| .run(stream_id.to_owned(), AGGREGATE_ID.to_owned()) | ||
| .await | ||
|
|
||
| if planning { |
Collaborator
There was a problem hiding this comment.
hope it is for the demo only :D
- Replace tokio::select! with tokio::try_join! to keep both pipelines running - Add comprehensive logging to ThreadProcessor for debugging - Add thread state validation before generating completions - Handle UserInputRequested events in Thread::apply to fix message sequencing The issue was that UserInputRequested events weren't being treated as assistant messages, causing the thread to reject subsequent user messages with 'WrongTurn' error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.